Create Invoice
POST /api/v1/Invoice/Create
Description
This endpoint is used to create a new invoice. It returns a CreateInvoiceResponseResponse object containing information about the newly created invoice.
Headers:
- None
ApiKey:
- No API key required
Content-Type:
-
text/plain
-
application/json
-
text/json
Path Parameters:
- version: string, required
Query Parameters:
- None
Request Body:
- An object of type CreateInvoice that contains the details of the invoice to be created.
URL:
- POST:
{{baseUrl API url}}/api/v1/Invoice/Create
Response:
- A CreateInvoiceResponseResponse object containing information about the newly created invoice.
Error Codes:
-
400: Bad Request
-
404: Resource not found
-
500: Internal server error
Example:
Request:
POST /api/v1/Invoice/Create
{
"invoiceId": "1234567890",
"counterpartyId": "0987654321",
"amount": 1000.00,
"currency": "USD",
"status": "Pending"
}
Response:
HTTP/1.1 200 OK
{
"invoiceId": "1234567890",
"counterpartyId": "0987654321",
"amount": 1000.00,
"currency": "USD",
"status": "Pending",
"createdDate": "2024-02-19T00:00:00.000Z",
"dueDate": "2024-03-20T00:00:00.000Z"
}
Method: POST
/api/v1/Invoice/Create
Headers
| Content-Type | Value |
|---|---|
Content-Type | application/json |
Headers
| Content-Type | Value |
|---|---|
| Accept | text/plain |
Body (raw)
{
"counterPartyId": "<uuid>",
"receivingAccountId": "<uuid>",
"counterPartyName": "<string>",
"accountName": "<string>",
"dueDate": "<dateTime>",
"currency": 2,
"products": [
{
"productId": "<uuid>",
"quantity": "<integer>",
"unitPrice": "<double>"
},
{
"productId": "<uuid>",
"quantity": "<integer>",
"unitPrice": "<double>"
}
],
"taxes": [
{
"taxId": "<uuid>",
"taxPercentageValue": "<double>"
},
{
"taxId": "<uuid>",
"taxPercentageValue": "<double>"
}
],
"discount": {
"discountType": 1,
"discountValue": "<double>"
},
"description": "<string>",
"billingCycle": 7,
"recuringInvoice": "<boolean>",
"notification": [
"<integer>",
"<integer>"
],
"paymentMethods": [
"<integer>",
"<integer>"
],
"beforeDueDates": [
"<integer>",
"<integer>"
],
"afterDueDates": [
"<integer>",
"<integer>"
],
"onDueDate": "<boolean>",
"sendInvoice": "<boolean>"
}
Response: 200
{
"succeeded": "<boolean>",
"message": "<string>",
"errors": [
"<string>",
"<string>"
],
"data": {
"invoiceId": "<uuid>",
"amount": "<double>"
}
}
LANGUAGE
CURL REQUEST
curl --request POST \
--url /api/v1/Invoice/Create \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!